package name.wilbur.course.db.bigone.model;
/**
 * @author wilbur
 */
public class Place extends BaseDBModel {
	private int cityID;
	private String cityName;
	private String placeDescription;
	
	public Place() {
	}

	public Place(int cityID, String cityName, String placeDescription) {
		this.cityID = cityID;
		this.cityName = cityName;
		this.placeDescription = placeDescription;
	}

	public int getCityID() {
		return cityID;
	}

	public void setCityID(int cityID) {
		this.cityID = cityID;
	}

	public String getCityName() {
		return cityName;
	}

	public void setCityName(String cityName) {
		this.cityName = cityName;
	}

	public String getPlaceDescription() {
		return placeDescription;
	}

	public void setPlaceDescription(String placeDescription) {
		this.placeDescription = placeDescription;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = super.hashCode();
		result = prime * result + cityID;
		result = prime * result
				+ ((cityName == null) ? 0 : cityName.hashCode());
		result = prime
				* result
				+ ((placeDescription == null) ? 0 : placeDescription.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (!super.equals(obj))
			return false;
		if (getClass() != obj.getClass())
			return false;
		Place other = (Place) obj;
		if (cityID != other.cityID)
			return false;
		if (cityName == null) {
			if (other.cityName != null)
				return false;
		} else if (!cityName.equals(other.cityName))
			return false;
		if (placeDescription == null) {
			if (other.placeDescription != null)
				return false;
		} else if (!placeDescription.equals(other.placeDescription))
			return false;
		return true;
	}

}
